package com.bdqn.t382.preview.service.impl;

import com.bdqn.t382.preview.dao.PetDao;
import com.bdqn.t382.preview.dao.impl.PetDaoMySQLImpl;
import com.bdqn.t382.preview.entity.Pet;
import com.bdqn.t382.preview.factory.PetDaoFactory;
import com.bdqn.t382.preview.service.PetService;
import jakarta.annotation.Resource;

@Resource
public class PetServiceImpl implements PetService {


    PetDao petDao = PetDaoFactory.getInstance(PetDaoFactory.defaultBeanName);

    @Override
    public boolean save(Pet pet) {
        return petDao.insert(pet) > 0;
    }

    public void setPetDao(PetDaoMySQLImpl petDao) {
    }
}
